import { post} from '../../http'
import store from '@/store'

//查询发送短信列表
export const querySmslist=({
  smsType,
  smsCode,
  smsSendTime,
  PageIndexs,
  PageSizes,
})=>{
  return post('/FTKJWLHYPT/system/querySms',{
    Data: {
      Parameters: {
        FTKJWLHYPT: {
          smsType,
          smsCode,
          smsSendTime,
          creator: store.state.user.USERNAME_DX_H,
          fltId: store.state.user.FLT_UUID_DX_H,
          dptId:store.state.user.DPTID_DX_H,
        }
      },
      PageIndex:{
        FTKJWLHYPT:PageIndexs
      },
      PageSize:{
        FTKJWLHYPT:PageSizes
      }
    }
  })
}

//查询糖厂和货主
export const queryTcAndHzList=()=>{
  return post('/FTKJWLHYPT/system/queryTcAndHzList',{
    Data: {
      Parameters: {
        FTKJWLHYPT: {
          creator: store.state.user.USERNAME_DX_H,
          fltId: store.state.user.FLT_UUID_DX_H,
          dptId:store.state.user.DPTID_DX_H,
        }
      },
    }
  })
}

//发送短信
export const sendSmsByMessage=({
  smsType,
  smsCode,
  smsSendGysId,
  smsSendTcHzId,
  smsContent,
})=>{
  return post('/FTKJWLHYPT/system/sendSms',{
    Data: {
      Parameters: {
        FTKJWLHYPT: {
          smsType,
          smsCode,
          smsSendGysId,
          smsSendTcHzId,
          smsContent,
          creator: store.state.user.USERNAME_DX_H,
          fltId: store.state.user.FLT_UUID_DX_H,
          dptId:store.state.user.DPTID_DX_H,
        }
      },
    }
  })
}

//根据短信发送类型查询编号
export const querySmsCodeList=({
  smsType,
})=>{
  return post('/FTKJWLHYPT/system/querySmsCodeList',{
    Data: {
      Parameters: {
        FTKJWLHYPT: {
          smsType,
        }
      },
    }
  })
}

